﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="ProductPromote_List.aspx.cs" Inherits="TimKen.Web.Admin.Product.ProductPromote_List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <%=GetLangString("MenuProductPromoteList")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
 
  <!-- 产品搜索 -->
    <div class="form-div">
        <img src="../images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <!-- 分类 -->
        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
        </asp:DropDownList>
        <!-- 品牌 -->
        <asp:DropDownList ID="ddlBrand" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBrand_SelectedIndexChanged">
        </asp:DropDownList>
        <!-- 是否促销 -->
        <asp:DropDownList ID="ddlIsPromote" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBrand_SelectedIndexChanged">
        </asp:DropDownList>
        <br />
        <!-- 关键字 -->
        <%=GetLangString("KeyWord")%>：<asp:TextBox ID="txtKeywords" runat="server"></asp:TextBox>
        <asp:Button ID="btnSearch" runat="server" CssClass="button" OnClick="btnSearch_Click" />
        
         <font color="red"><%=GetLangString("PromoteDesc")%></font>
    </div>
    <div class="list-div">
        <!-- 产品列表 -->
        <asp:GridView ID="grdProductPromote" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID"
            PageSize="15" AllowSorting="True" CssClass="grid" 
             onrowediting="grdProductPromote_RowEditing" 
            onrowcancelingedit="grdProductPromote_RowCancelingEdit" 
            onrowupdating="grdProductPromote_RowUpdating"  >
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("ItemCode")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("ItemCode")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="150" />
                    <HeaderTemplate>
                        <%=GetLangString("ProductName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("Name")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="150" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("IsPromote")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#GetBoolPic(bool.Parse(Eval("IsPromote").ToString()))%>
                    </ItemTemplate>
                    <EditItemTemplate>
                    <asp:CheckBox ID="cbIsPromote" runat="server"  Checked='<%# Bind("IsPromote")%>' />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="150" />
                    <HeaderTemplate>
                        <%=GetLangString("PromoteFrom")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("PromoteFrom","{0:d}")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPromoteFrom" runat="server" Text='<%# Bind("PromoteFrom") %>'  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="160" />
                    <HeaderTemplate>
                        <%=GetLangString("PromoteTo")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("PromoteTo", "{0:d}")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPromoteTo" runat="server" Text='<%# Bind("PromoteTo") %>'   onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="160" />
                    <HeaderTemplate>
                        <%=GetLangString("PromoteDiscount")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("PromoteDiscount")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPromoteDiscount" runat="server" Text='<%# Bind("PromoteDiscount") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
              
                <asp:CommandField ButtonType="Image"  CancelImageUrl="../images/icon_drop.gif" EditImageUrl="/Admin/images/icon_edit.gif" UpdateImageUrl="../images/icon_OK.gif"
                    ShowEditButton="True" />
                
                 
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
        <div class="pager-div">
            <ux:AspNetPager ID="AspNetPager1" runat="server" Width="100%" ShowPageIndexBox="Always"
                HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="DropDownList"
                OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" 
                        NavigationButtonType="Image" ButtonImageNameExtension="n" 
                        CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
</asp:Content>
